#ifndef __WIDGET_CLOCK_ANALOG_H__
#define __WIDGET_CLOCK_ANALOG_H__

#include <QWidget>
#include <QPainter>
#include <QDateTime>
#include <QPaintEvent>
#include <QResizeEvent>

class AnalogClockWidget: public QWidget
{
	Q_OBJECT

public:
	explicit AnalogClockWidget(QWidget* parent = nullptr);

	void setTime(const QDateTime& time);
	void setShowSeconds(bool);
	void setDarkTheme(bool);
protected:
	void paintEvent(QPaintEvent* event) override;
	void resizeEvent(QResizeEvent* event) override;

	void drawClockFace(QPainter& painter);
	void drawClockHands(QPainter& painter);
	void drawClockNumbers(QPainter& painter);
private:
	QDateTime m_time;
	bool m_showSeconds;
	bool m_darkTheme;
	QRect m_clockRect;
};

#endif	// __WIDGET_CLOCK_ANALOG_H__